package com.linys.scala.qf.day03

/**
  * 构造器
  */
class StructDemo(val a: String, var b: Int, c: Int = 60, d: Int = 80) {

  var f: Int = _
  def this(a: String, b: Int, f: Int) {
    this(a, b)
    this.f = f
  }

}

object StructDemo {

  def main(args: Array[String]): Unit = {
    val sd = new StructDemo("213", 2, 3, 2)
    println(sd.f)
    //println(sd.d)
    //println(sd.c)
  }

}

